package stub;

import java.util.ArrayList;

import businesslogic.network.RMIStubClient;

import databaseservice.MemberPOService;
import databaseservice.OrderPOService;

import po.MemberPO;
import po.OrderPO;

public class ListInformationBLService implements
		businesslogicservice.ListInformationBLService {
	private MemberPOService mMemberPOService;
	private OrderPOService mOrderPOService;
	
	public ListInformationBLService(RMIStubClient client){
		mMemberPOService=client.memberPOService;
		mOrderPOService=client.orderPOService;
	}

	@Override
	public MemberPO checkInformation(int memberID) {
		// TODO Auto-generated method stub
		try {
			return mMemberPOService.search(memberID);
		} catch (Exception e) {
			// TODO: handle exception
			e.printStackTrace();
			return null;
		}
		
	}

	@Override
	public ArrayList<OrderPO> checkHistory(int memberID) {
		// TODO Auto-generated method stub
		try {
				return mOrderPOService.seatch(memberID);
		} catch (Exception e) {
			// TODO: handle exception
			e.printStackTrace();
			return null;
		}

	}

	@Override
	public ArrayList<OrderPO> checkOrder(int memberID) {
		// TODO Auto-generated method stub
		try {
			return mOrderPOService.seatch(memberID);
	} catch (Exception e) {
		// TODO: handle exception
		e.printStackTrace();
		return null;
	}
	}

}
